package mua.core.operation.list;

import mua.core.value.List;
import mua.core.value.MuaValue;

import java.util.ArrayList;

public class Sentence {
    public static MuaValue run(MuaValue a, MuaValue b) {
        ArrayList<MuaValue> list = new ArrayList<>();
        if(a instanceof List){
            list.addAll((ArrayList<MuaValue>) a.getValue());
        }else {
            list.add(a);
        }

        if(b instanceof List){
            list.addAll((ArrayList<MuaValue>)b.getValue());
        }else {
            list.add(b);
        }

        return new List(list);
    }
}
